package com.lzj.admin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * @Author:王亚栋
 * @Date:2022/5/21 19:29
 * @Version:1.0
 */
@Controller
public class MainController {

    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    @RequestMapping("/main")
    public String main(){
        return "main";
    }

    @RequestMapping("/welcome")
    public String welcome(){
        return "welcome";
    }


    /**
     * 用户退出
     * @return
     */
    @RequestMapping("/signout")
    public String signout(HttpSession session){

        session.removeAttribute("user");

        return "redirect:index";

    }

}
